package personal.dao.support;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.LocalEntityManagerFactoryBean;
import org.springframework.stereotype.Component;

@Component
public class HibernatePropertyReader {
	private LocalEntityManagerFactoryBean accountingEMF;
	
	public LocalEntityManagerFactoryBean getAccountingEMF() {
		return accountingEMF;
	}

	@Autowired(required=false)
	public void setAccountingEMF(LocalEntityManagerFactoryBean accountingEMF) {
		this.accountingEMF = accountingEMF;
	}

	public String getProperty(String key) {
		return (String)accountingEMF.getJpaPropertyMap().get(key);
	}

}
